<script setup>
import CodeMirror from '@/components/CodeMirror/index.vue';
const configExample = ref(`{
  //*** API类型配置 ***
  "apiConfig": [
    {
      "label": "stripe-授权模式",
      "value": "1",
      "payName":"stripe_api", //*** 收款名称 ***
      "plugin": "/wp-json/stripeAuthInterface", //*** API插件地址 ***
      //*** 主动获取支付状态 ***
      "updateStatus": {
         "count": 20,   //*** 回调次数 ***
         "interval": 3  //*** 间隔分钟数 ***
      },
      //*** 支付方式配置 ***
      "payMethod": [
        {
          "label": "官方收银台模式",
          "value": "1",
          "notShowReceive": true //*** 标识不显示收款方式 ***
        },
        {
          "label": "JS内嵌模式",
          "value": "2",
          "innerType": 0, //*** 内嵌类型 0 wp插件内嵌，带金额   1 wp插件内嵌   2 直连内嵌   3 支付链接作为内嵌链接 ***
          "notShowReceive": true //*** 标识不显示收款方式 ***
        }
      ]
    }
  ],
    
    
  //*** 订单物流配置 ***
  "logisticsConfig": {
    "show": true, //*** 是否显示推送物流 ***
      //*** 自定义物流信息 ***
    "logistItem": [
      {
        "label": "物流公司代码",
        "value": "code",
        "require": true,
        "tips": "参考网站:https://developer.paypal.com/docs/api/tracking/v1/#trackers-batch_post"
      }
    ],
     //*** 自定义物流收货信息 ***
    "addressItem":[
      {
          "label": "收货人姓名",
          "value": "first_name",
          "require": true,
          "placeholder":"fist_name"
        }
     ]
  },
    
    
  //*** 账号封禁标识配置 ***
  "accountBanConfig": [
    {
      "error": "Your account cannot currently make live charges.", //*** 封禁关键字 ***
      "compare": "equal" //*** 比较类型  contain：包含   equal：相等  ***
    },
    {
      "error": "Expired API Key provided",
      "compare": "contain"
    }
  ],
    
    
   //*** 自定义收款账号配置字段 ***
  "accountItem": [
    {
      "label": "支付接口API",
      "value": "payApi",
      "require": true,
      "readonly": true,
      "default": "/api/AdyenLogic/WebPay",
      "placeholder":"支付接口API 不需要修改"
    },
    {
      "label": "商户ID",
      "value": "clientId",
      "require": true,
      "placeholder":"商户ID在 支付系统->系统配置 下查看"
    }
  ],
    
    
  //*** 物流excel模板下载地址 ***
  "excelTemplateUrl":"https://core.htadminusre.xyz/Stripe物流信息导入模板.xlsx"
}`);
</script>

<template>
  <div>
    <CodeMirror v-model="configExample" height="98%" />
  </div>
</template>

<style scoped lang="scss"></style>
